﻿using DocumentFormat.OpenXml.Lite.Helper;
using DocumentFormat.OpenXml.Lite.WordprocessingML.Word.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.WordprocessingML.Word.Table.CellProperties
{
    [XmlRoot("hMerge", Namespace = Constants.WordMain)]
    public class HorizontallyMerged : XmlSerializable, ITableCellPropElement
    {
        [Optional]
        [XmlAttribute("val", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_Merge> Value { get; set; }

        public HorizontallyMerged() { }

        public void Copy(object obj)
        {
            if (obj is HorizontallyMerged)
            {
                this.Value = (obj as HorizontallyMerged).Value;
            }
        }
    }
}
